package com.jmcba.daily

class Inspection {
    private val age = 0
    private val isUsual = true
    private val priceUnit = 48000
    fun calcFrequency(): Int {
        var count = 0
        if (isUsual) { // 新规则
            if (age > 5) {
                count++
            }
            if (age > 9) {
                count += age - 9
            }
        } else {
            // 老规则 TODO
        }
        return count
    }

    fun calcSpent(): Int {
        return this.priceUnit * this.calcFrequency()
    }
}